<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_data_tables.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>对账接入者管理系统</title>
    <meta name="keywords" content="对账接入者管理系统">
    <meta name="description" content="对账接入者管理系统">

    <link rel="shortcut icon" href="{{asset('dealer/img/favicon.ico')}}">
    <link href="{{asset('dealer/css/bootstrap.min.css')}}" rel="stylesheet">
    <link href="{{asset('dealer/css/font-awesome.min.css')}}" rel="stylesheet">

    <!-- Data Tables -->

    <link href="{{asset('dealer/css/plugins/dataTables/dataTables.bootstrap.css')}}" rel="stylesheet">

    <link href="{{asset('dealer/css/animate.min.css')}}" rel="stylesheet">
    <link href="{{asset('dealer/css/style.min.css')}}" rel="stylesheet">

    <link href="{{asset('dealer/css/plugins/datapicker/datepicker3.css')}}" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="{{asset('layui/src/css/layui.css')}}" />
</head>

<body class="gray-bg">
<style>
    table.dataTable thead .sorting:after {
        content: "";
    }

    table.dataTable,
    .table-bordered {
        text-align: center;
    }
</style>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>交易记录管理</h5>
                </div>
                <div class="ibox-content">
                    <div class="row" style="margin-bottom: 5px">
                        <!--
                         <div class="col-sm-6">
                            <strong>熊宝宝</strong>
                        </div>
                        <div class="col-sm-6">
                            <strong style="float: right;font-size: 20px">剩余金额：
                                <span id="" style="font-size: 20px">4800</span>元</strong>
                        </div>
                        !-->
                    </div>
                    <table class="table table-striped table-bordered table-hover dataTables-example">
                        <thead>
                        <tr>
                            <th style="text-align: center;">
                                <strong>序号</strong>
                            </th>
                            <th style="text-align: center;">
                                <strong>接入者名称</strong>
                            </th>
                            <th style="text-align: center;">
                                <strong>总收益（元）</strong>
                            </th>
                            <th style="text-align: center;">
                                <strong>操作</strong>
                            </th>
                        </tr>
                        </thead>
                        <tbody id="tbody-content">



                        </tbody>
                    </table>
                    <div class="row">
                        <div id="pages" style="float: right;"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="{{asset('dealer/js/jquery.min.js')}}"></script>
<script src="{{asset('dealer/js/bootstrap.min.js')}}"></script>
<script src="{{asset('dealer/js/plugins/jeditable/jquery.jeditable.js')}}"></script>
{{--<script src="js/plugins/dataTables/jquery.dataTables.js"></script>--}}
{{--<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>--}}
<script src="{{asset('dealer/js/content.min.js')}}"></script>
<script type="text/javascript" src="{{asset('lib/laypage/1.2/laypage.js')}}"></script>
<script type="text/javascript" src="{{asset('layui/src/layui.js')}}"></script>
<script>


    function fnClickAddRow() {
        $("#editable").dataTable().fnAddData(["Custom row", "New row", "New row", "New row"])
    };


    $(document).ready(function () {

        var sum = "";
        $.ajax({
            method: "POST",
            url: "B_deal",
            data: {"type":"2","rows": 10, "page": 1,'_token':'{{csrf_token()}}'},
            async: false,
            dataType: "json",
            success:function (eval) {
                if ( eval.code == '200' ) {
                    sum = eval.data.total;
                    console.log('sum='+eval.data.total);
                } else if ( eval.code == '666' ) {
                    loginFaild();
                }
            }
        });

        layui.use('laypage', function(){
            var laypage = layui.laypage;

            //总页数大于页码总数
            laypage.render({
                elem: 'pages'
                ,count: sum //数据总数
                ,jump: function(obj){
                    console.log(obj.curr)
                    $.ajax({
                        method: "POST",
                        url: "B_deal",
                        data: {"type":"2","rows": 5, "page": obj.curr,'_token':'{{csrf_token()}}'  },
                        dataType: "json",
                        success:function (eval) {
                            if ( eval.code == '200' ) {
                                $('#tbody-content').html("");
                                $.each(eval.data.records, function (index, item) {
                                    var html = '<tr >\n' +
                                        '                <td class="center">' + parseInt(index+1) + '</td>\n' +
                                        '                <td class="center">' + item.corporateName + '</td>\n' +
                                        '                <td class="center">\n' +
                                        '                    <i class="fa fa-cny">' + item.totalAmount + '</i>\n' +
                                        '                </td>\n' +
                                        '                <td class="center">\n' +
                                        '                    <a href="{{action('DealController@b_deal_details')}}?id='+item.id+'&type=2" class="btn btn-w-m btn-info">查看详情</a>\n' +
                                        '                </td>\n'
                                       ;
                                    $('#tbody-content').append(html);
                                });
                            }
                        }
                    });
                }
            });
        });






    })





</script>


</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_data_tables.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->

</html>